/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: ClassRefletInterceptHandlerFactory
 * Author:   Administrator
 * Date:     2019/12/21 0:08
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.lumeng.spring.common.factory;

import com.lumeng.spring.common.handler.LoggerInterceptorHandler;

/**
 * 功能描述:
 * <>
 *
 * @program: etc_issue
 * @ClassName: ClassRefletInterceptHandlerFactory
 * @author: wanghui
 * @date: 2019/12/21 0:08
 * @Version: 1.0.0
 *
 * @Copyright: 2019 Inc. All rights reserved. 注意: 本内容仅限于内部传阅,禁止外泄以及用于其他的商业目
 */
public class ClassRefletInterceptHandlerFactory {

    private String className;

    public ClassRefletInterceptHandlerFactory(final String className) {
        this.className = className;
    }

    public LoggerInterceptorHandler instance(){
        LoggerInterceptorHandler interceptorHandler = null ;
        try{
            interceptorHandler = (LoggerInterceptorHandler) Class.forName(className).newInstance() ;
        }catch(Exception e ){
            e.printStackTrace() ;
        }
        return interceptorHandler ;
    }
}
